package com.moleq.models;

import com.moleq.db.DatabaseSchema;

public class StoreSetting {
//	CREATE TABLE t_store_setting
//	(ss_id INTEGER NOT NULL,
//	ss_name varchar(50) NOT NULL,
//	ss_other_name varchar(50) NULL,
//	ss_address_1 varchar(45) NULL,
//	ss_address_2 varchar(45) NULL,
//	ss_city varchar(35) NULL,
//	ss_state varchar(2) NULL,
//	ss_zip varchar(10) NULL,
//	ss_telephone varchar(15) NULL,
//	ss_fax varchar(15) NULL,
//	ss_website varchar(50) NULL,
//	create_datetime varchar(14) NOT NULL,
//	update_datetime varchar(14) NOT NULL,
//	ss_business_name varchar(50) NULL;
//	PRIMARY KEY (ss_id));
	private int ss_id;
	private String ss_name;
	private String ss_other_name;
	private String ss_address_1;
	private String ss_address_2;
	private String ss_city;
	private String ss_state;
	private String ss_zip;
	private String ss_telephone;
	private String ss_fax;
	private String ss_website;
	private String create_datetime;
	private String update_datetime;
	private String ss_business_name;
	
	public StoreSetting(){}
	public StoreSetting(int ss_id, String ss_name, String ss_other_name,
			String ss_address_1, String ss_address_2, String ss_city,
			String ss_state, String ss_zip, String ss_telephone, String ss_fax,
			String ss_website,String ss_business_name) {
		this.ss_id = ss_id;
		this.ss_name = ss_name;
		this.ss_other_name = ss_other_name;
		this.ss_address_1 = ss_address_1;
		this.ss_address_2 = ss_address_2;
		this.ss_city = ss_city;
		this.ss_state = ss_state;
		this.ss_zip = ss_zip;
		this.ss_telephone = ss_telephone;
		this.ss_fax = ss_fax;
		this.ss_website = ss_website;
		this.ss_business_name = ss_business_name;
	}

	public int getSs_id() {
		return ss_id;
	}
	public void setSs_id(int ss_id) {
		this.ss_id = ss_id;
	}
	public String getSs_name() {
		return ss_name;
	}
	public void setSs_name(String ss_name) {
		this.ss_name = ss_name;
	}
	public String getSs_other_name() {
		return ss_other_name;
	}
	public void setSs_other_name(String ss_other_name) {
		this.ss_other_name = ss_other_name;
	}
	public String getSs_address_1() {
		return ss_address_1;
	}
	public void setSs_address_1(String ss_address_1) {
		this.ss_address_1 = ss_address_1;
	}
	public String getSs_address_2() {
		return ss_address_2;
	}
	public void setSs_address_2(String ss_address_2) {
		this.ss_address_2 = ss_address_2;
	}
	public String getSs_city() {
		return ss_city;
	}
	public void setSs_city(String ss_city) {
		this.ss_city = ss_city;
	}
	public String getSs_state() {
		return ss_state;
	}
	public void setSs_state(String ss_state) {
		this.ss_state = ss_state;
	}
	public String getSs_zip() {
		return ss_zip;
	}
	public void setSs_zip(String ss_zip) {
		this.ss_zip = ss_zip;
	}
	public String getSs_telephone() {
		return ss_telephone;
	}
	public void setSs_telephone(String ss_telephone) {
		this.ss_telephone = ss_telephone;
	}
	public String getSs_fax() {
		return ss_fax;
	}
	public void setSs_fax(String ss_fax) {
		this.ss_fax = ss_fax;
	}
	public String getSs_website() {
		return ss_website;
	}
	public void setSs_website(String ss_website) {
		this.ss_website = ss_website;
	}
	public String getCreate_datetime() {
		return create_datetime;
	}
	public void setCreate_datetime(String create_datetime) {
		this.create_datetime = create_datetime;
	}
	public String getUpdate_datetime() {
		return update_datetime;
	}
	public void setUpdate_datetime(String update_datetime) {
		this.update_datetime = update_datetime;
	}
	
	public String getSs_business_name() {
		return ss_business_name;
	}
	public void setSs_business_name(String ss_business_name) {
		this.ss_business_name = ss_business_name;
	}
	public String toMGData(String Action) {
		String Result = Action + "|" + DatabaseSchema.StoreSetting.SCHEMA_NAME
				+ "|(" + getSs_id() + "," + CheckNull(getSs_name()) + "," + CheckNull(getSs_other_name()) 
				+ "," + CheckNull(getSs_address_1()) + "," + CheckNull(getSs_address_2()) + "," + CheckNull(getSs_city())
				+ "," + CheckNull(getSs_state()) + "," + CheckNull(getSs_zip()) + "," + CheckNull(getSs_telephone())
				+ "," + CheckNull(getSs_fax()) + "," + CheckNull(getSs_website()) 
				+ "," + CheckNull(getCreate_datetime()) + "," + CheckNull(getUpdate_datetime()) 
				+ ","+ CheckNull(getSs_business_name()) +")";
		return Result;
	}
	
	public String CheckNull(String value){
		if(value == null){
			return null;
		}else{
			return "'" + value + "'";
		}
	}
}
